<?php
include('../../../../php/eliminar_cache.php');
include_once('../../../../php/bd.php');
require_once('../../../../php/funciones.php');
require_once('codigo/procesar.php');

$bd = new DB();
$id = $_GET['id'];
@$select_dimension = $bd->query("SELECT * FROM detalle_dimensiones WHERE id_dimension='$id'", OBJ);
$id_dimension = $select_dimension->rows[0]->id_dimension;
$i = 0;
$arr = array();
foreach($select_dimension->rows as $arr_dim){ 
	if(!empty($arr_dim->id_resultado)){ 
		$arr[$i] = $arr_dim->id_resultado; 
		$i++; 
		} 
}
$id_mejora= $select_dimension->rows[0]->id_mejoras;

echo '<input name="eliminar" value="1" type="hidden"/>';
echo '<input name="id_dimension" value="'.$id.'" type="hidden"/>';

echo '<fieldset>';
echo '<table cellspacing="0" cellpadding="0">';
echo '<tr>';
echo '<td>Dimension</td>';
echo '<td>'.select_rango("dimensiones","id_dimension","nombre_dimension","dimensiones",$id_dimension,"id_area","1").'</td>';
echo '</tr>';
echo '</table>';
echo '</fieldset>';

echo '<fieldset>';
echo '<table cellspacing="0" cellpadding="0">';
echo '<tr>';
echo '<td>Inciden En</td>';
echo '<td>'.select_multiple("inciden","id_resultado","nombre_resultado","resultados_dimensiones",$arr).'</td>';
echo '</tr>';
echo '</table>';
echo '</fieldset>';

echo '<fieldset>';
echo '<table cellspacing="0" cellpadding="0">';
echo '<tr>';
echo '<td>Proceso de Mejora</td>';
echo '<td>'.select("mejoras","id_mejoras","nombre_mejoras","mejoras_dimensiones",$id_mejora).'</td>';
echo '</tr>';
echo '</table>';
echo '</fieldset>';
?>